home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group95c.txt
/
000038_icon-group-sender _Tue Oct 10 13:42:54 1995.msg
< prev
next >
Wrap
Internet Message Format
|
1996-01-03
|
2KB
Received: by cheltenham.cs.arizona.edu; Tue, 10 Oct 1995 12:32:12 MST
Date: Tue, 10 Oct 95 13:42:54 CDT
From: johnp@utafll.uta.edu (John Paolillo)
Message-Id: <9510102042.AA25964@utafll.uta.edu>
To: icon-group@cs.arizona.edu
Subject: Icon and HyperTalk/AppleScript
Errors-To: icon-group-errors@cs.arizona.edu
(A breakaway from the Perl and other lgs. thread)
Hypertalk has a "chunking" construct for
referring to pieces of text between delimiters.
Oftentimes this is more convenient and understandable
than the kinds of expressions you need in Icon to do
the same thing (I don't know about SNOBOL). I have
found myself in situations where I wished I could use
chunking in Icon. For more flexible text processing
(i.e where parsing higher-order constructs is necessary)
Hypertalk is a very poor choice, and Icon (because of
its data structures and backtracking, both absent in
Hypertalk) works very well. AppleScript is somewhere
between the two because it has better data structures
than Hypertalk, and it doesn't inherently have the
chunking of Hypertalk (you need an application or an
OSAX to give you that), but since it does have lists
(but no built-in backtracking) you could do parsing
in AppleScript a bit easier.
So, for text processing in which simply-delimited constructs
are all that is needed (e.g. reading the header lines of a
mail file), Hypertalk is easier to use than Icon. But if
you care to go further (e.g. indexing the content of the mail
messages of the same file), then Icon is much more flexible,
and hence tons better.
It was because of these similarities/differences that I
originally suggested an OSA (open scripting architecture --
Apple's standard for scripting languages) implementation of
Icon. Both Hypertalk and Applescript are now OSA compliant.
A few other languages are too (TCL and J/APL for instance,
I'm not sure about Perl). Generally I prefer what I write
to be in Icon, since there are features of AppleScript and
HyperTalk that I don't like (for instance, AppleScript has
a really bogus semantics for list concatenations that flattens
out some lists), and Icon is overall more flexible than the
other 2.
I hope this clarifies why someone might use Hypertalk instead
of Icon for some text processing tasks.
John C. Paolillo
Linguistics Program
University of Texas at Arlington